<?php
namespace ctrl\demo;

class stock
{
    //http://ec.com/?c=demo_stock&a=sumByCountry
    public static function sumByCountry()
    {
        \serv\task\warehouse\stock::sumByCountry();
    }

    //http://ec.com/?c=demo_stock&a=sumByBelong
    public static function sumByBelong()
    {
        \serv\task\warehouse\stock::sumByBelong();
    }

    //http://ec.com/?c=demo_stock&a=stockSummary
    public static function stockSummary()
    {
        \serv\task\warehouse\stock::stockSummary();
    }

    //http://ec.com/?c=demo_stock&a=stockSummaryQueue
    public static function stockSummaryQueue()
    {
        $string = '[{"sku":"A0000209B3J-KDA-166","sku_name":"休闲躺椅主体-开放漆面-胡桃木纹-荔枝纹米白色真皮166(大版本)","shipped_total":"18"},{"sku":"A0000209C-KDA","sku_name":"休闲躺椅五金-亮面黑底","shipped_total":"1143"},{"sku":"A0000212B3J-KDA","sku_name":"休闲躺椅主体-开放漆面-酸枝木纹-荔枝纹米白色真皮(大版本)","shipped_total":"9"},{"sku":"A0000212B3J-KDA-166","sku_name":"休闲躺椅主体-开放漆面-酸枝木纹-荔枝纹米白色真皮166(大版本)","shipped_total":"18"},{"sku":"A0000223B3J-KDA","sku_name":"休闲躺椅主体-开放漆面-胡桃木纹-荔枝纹黑色真皮-B款(大版本)","shipped_total":"803"},{"sku":"A0000223D-DZJ-KDA","sku_name":"休闲躺椅配件(底座组件)-开放漆面-胡桃木纹-荔枝纹黑色真皮-B款(大版本)","shipped_total":"23"},{"sku":"A0000223D-KBJ-KDA","sku_name":"休闲躺椅配件(靠背组件)-开放漆面-胡桃木纹-荔枝纹黑色真皮-B款(大版本)","shipped_total":"23"},{"sku":"A0000224B3J-KDA","sku_name":"休闲躺椅主体-开放漆面-酸枝木纹-荔枝纹黑色真皮-C款(大版本)","shipped_total":"319"},{"sku":"A0000224B3J-KDA-KH1","sku_name":"休闲躺椅主体-开放漆面-酸枝木纹-荔枝纹黑色真皮-C款(大版本)","shipped_total":"218"},{"sku":"A0000224D-DZJ-KDA","sku_name":"休闲躺椅配件(底座组件)-开放漆面-酸枝木纹-荔枝纹黑色真皮-C款(大版本)","shipped_total":"18"},{"sku":"A0000224D-KBJ-KDA","sku_name":"休闲躺椅配件(靠背组件)-开放漆面-酸枝木纹-荔枝纹黑色真皮-C款(大版本)","shipped_total":"18"},{"sku":"A0000226B3J-KDA","sku_name":"休闲躺椅主体-开放漆面-深酸枝木纹-荔枝纹黑色真皮(大版本)","shipped_total":"142"},{"sku":"A0000235B1J-KDA","sku_name":"休闲躺椅主体-开放漆面-酸枝木纹-墨绿色五星真牛皮(高端版大版本)","shipped_total":"27"},{"sku":"A0000241B3J-KDA","sku_name":"休闲躺椅主体-开放漆面-胡桃木纹-荔枝纹纯白色真皮(大版本)","shipped_total":"83"},{"sku":"A0000242B3J-KDA","sku_name":"休闲躺椅主体-开放漆面-酸枝木纹-荔枝纹纯白色真皮(大版本)","shipped_total":"193"},{"sku":"A000055-LBM-B","sku_name":"飞机椅-水曲柳+黑PU","shipped_total":"20"},{"sku":"A000055A-LBK-B","sku_name":"飞机椅-酸枝色+黑PU","shipped_total":"100"},{"sku":"A000055A-LBN-B","sku_name":"飞机椅-胡桃木色+黑PU","shipped_total":"160"},{"sku":"A000055A01-LBK-B","sku_name":"飞机椅-酸枝色+黑PU","shipped_total":"36"},{"sku":"A000055A01-LBN-B","sku_name":"飞机椅-胡桃木色+黑PU","shipped_total":"148"},{"sku":"A000056A-LBK-B3","sku_name":"飞机椅-酸枝色+黑PU","shipped_total":"83"},{"sku":"A000056A-LBN-B5","sku_name":"飞机椅-胡桃木色+黑PU","shipped_total":"118"},{"sku":"A00011A-PJ-33","sku_name":"梳妆台基础款A、B款-灯泡","shipped_total":"75"},{"sku":"A00011A-W","sku_name":"梳妆台基础款-A款-白色","shipped_total":"435"},{"sku":"A00022A-B","sku_name":"梳妆台基础款-B款-黑色","shipped_total":"30"},{"sku":"A00022A-PJ-01","sku_name":"梳妆台基础款B款-1号板（含镜子）","shipped_total":"10"},{"sku":"A00022A-PJ-02","sku_name":"梳妆台基础款B款-2号板","shipped_total":"30"},{"sku":"A00022A-PJ-03","sku_name":"梳妆台基础款B款-3号板","shipped_total":"20"},{"sku":"A00022A-PJ-04","sku_name":"梳妆台基础款B款-4号板","shipped_total":"10"},{"sku":"A00022A-PJ-05","sku_name":"梳妆台基础款B款-5号板","shipped_total":"10"},{"sku":"A00022A-PJ-06","sku_name":"梳妆台基础款B款-6号板","shipped_total":"10"},{"sku":"A00022A-PJ-07","sku_name":"梳妆台基础款B款-7号板","shipped_total":"10"},{"sku":"A00022A-PJ-08","sku_name":"梳妆台基础款B款-8号板","shipped_total":"10"},{"sku":"A00022A-PJ-09","sku_name":"梳妆台基础款B款-9号板","shipped_total":"10"},{"sku":"A00022A-PJ-10","sku_name":"梳妆台基础款B款-10号板","shipped_total":"10"},{"sku":"A00022A-PJ-11","sku_name":"梳妆台基础款B款-11号板","shipped_total":"15"},{"sku":"A00022A-PJ-12","sku_name":"梳妆台基础款B款-12号板","shipped_total":"10"},{"sku":"A00022A-PJ-13","sku_name":"梳妆台基础款B款-13号板","shipped_total":"10"},{"sku":"A00022A-PJ-14","sku_name":"梳妆台基础款B款-14号板","shipped_total":"10"},{"sku":"A00022A-PJ-15","sku_name":"梳妆台基础款B款-15号板","shipped_total":"10"},{"sku":"A00022A-PJ-16","sku_name":"梳妆台基础款B款-16号板","shipped_total":"10"},{"sku":"A00022A-PJ-17","sku_name":"梳妆台基础款B款-17号板","shipped_total":"30"},{"sku":"A00022A-PJ-18","sku_name":"梳妆台基础款B款-18号板","shipped_total":"30"},{"sku":"A00022A-PJ-19","sku_name":"梳妆台基础款B款-19号板","shipped_total":"10"},{"sku":"A00022A-PJ-20","sku_name":"梳妆台基础款B款-20号板","shipped_total":"10"},{"sku":"A00022A-PJ-21","sku_name":"梳妆台基础款B款-21号板","shipped_total":"20"},{"sku":"A00022A-PJ-22","sku_name":"梳妆台基础款B款-22号板","shipped_total":"20"},{"sku":"A00022A-PJ-23","sku_name":"梳妆台基础款B款-23号板","shipped_total":"10"},{"sku":"A00022A-PJ-24","sku_name":"梳妆台基础款B款-24号板","shipped_total":"10"},{"sku":"A00022A-PJ-25","sku_name":"梳妆台基础款B款-25号板","shipped_total":"15"}]';
        $data['data'] = json_decode($string, true);
        \serv\queue\warehouse\stock::stockSummaryQueue($data);
    }

    //http://ec.com/?c=demo_stock&a=stockQueue
    public static function stockQueue()
    {
        \serv\task\warehouse\stock::stockQueue();
    }

    //http://ec.com/?c=demo_stock&a=stockQueues
    public static function stockQueues()
    {
        $string = '{"id":"1","order_no":"PO20240802001","type":"1","order_type":"1"}';
        $data['data'] = json_decode($string, true);
        \serv\queue\warehouse\stock::stockQueue($data);
    }

}